<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link href="http://www.boc.cn/favicon.ico" rel="Shortcut Icon" type="image/x-icon">
	</head>
	
<script language="JavaScript">

	function alertTest(){
	document.write("程序开始");
	var a=10;
	var b=20;
	document.write("程序执行");
	document.write(a+b);
	document.write("查询结束");
}







</script>


	<body>
		
		
		<!--try catch finally 语句-->
	<script language="JavaScript">
		
		try{
			document.forms.input.length;
			
		}catch(exception){
			alert("没有定义表单以及文本框");
		}finally{
			alert("结束 try...catch...finally 语句");
		}
		
		
		
		
		
		
		
		
	</script>		
		
		
		
		
		
		
		
		
		
		
		





<script>


	try{
		document.forms.input.length;
	}catch(exception){
		alert("try区域有异常发生");
		try{
			document.forms.input.length;
		}catch(exception2){
			alert("catch区域有异常发生");
		}
	}finally{
		alert("结束 try catch finally 语句");
	}





</script>-->


<!--<script>

try{
	var num=1/10;
	if(num=="infinity"){
		throw new Error("除数不能为0");
	}
}catch(exception){
	alert(exception.message);
}



</script>-->

















		
		
	</body>
</html>
